
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{:U('Sales/ju_edit',array('proid'=>$proid))}" target="dialog" width="600" height="500"><span>添加</span></a></li>
			<!-- <li><a class="delete" href="demo/common/ajaxDone.html?uid={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
			<li><a class="edit" href="demo_page4.html?uid={sid_user}" target="navTab"><span>修改</span></a></li>
			
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
			-->
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th>产品名称</th>
				<th>subject</th>
				<th>数值</th>
				<th>优惠说明</th>
				<th>优惠数量限制</th>
				<th>开始时间</th>
				<th>结束时间</th>
				<th>可以使用的次数</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<volist name="list" id="vo">
			<tr target="sid_user" rel="9">
				<td>{$productname}</td>
				<td>{$vo.subject}</td>
				<td>{$vo.value}</td>
				<td>{$vo.remark}</td>
				<td>{$vo.number}</td>
				<td>{if $vo['starttime']}{$vo.starttime|date='Y-m-d H:i:s',###}{else}不限制{/if}</td>
				<td>{if $vo['endtime']}{$vo.endtime|date='Y-m-d H:i:s',###}{else}不限制{/if}</td>
				<td>{if $vo['frequency']}{$vo.frequency}{else}不限制{/if}</td>
				<td>
					<a class="btnEdit" href="{:U('Sales/ju_edit',array('id'=>$vo['id'],'proid'=>$vo['product_id']))}" target="dialog" width="600" height="500" title="编辑">编辑</a>
					<a class="btnEdit" href="{:U('Sales/ju_del',array('id'=>$vo['id'],'proid'=>$vo['product_id']))}" target="navTab" title="作废">作废</a>
				</td>
			</tr>
			</volist>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="200" numPerPage="20" pageNumShown="10" currentPage="1"></div>

	</div>
</div>
<script type="text/javascript">
function set_param(obj, id, type, model){
	var obj = $(obj).prev();
	$.ajax({
		type: "POST",
		url: "{:U('Product/set_param')}",
		data: 'id='+id+'&type='+type+'&value='+obj.val()+'&model='+model,
		dataType:'json',
		success: function(msg){
			alertMsg.info('修改成功！');
			if ( type == 'image' )
				if ( obj.val() ) obj.val(0);
				else obj.val(1);
		}
	});
}
</script>
